#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QToolButton>
#include <QGraphicsScene>
#include <QGraphicsBlurEffect>
#include <QNetworkReply>
#include <QProcess>
#include <QListWidgetItem>
#include <QNetworkAccessManager>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    QProcess *player = new QProcess(this);
    QGraphicsScene *myscene =new QGraphicsScene;
    void Blur(QString Path);
    int picNum=1;
    int search=0;
    QStringList SearchedBVList;
    int SearchPage=1;
    QGraphicsPixmapItem *Graitem;
    int m_blurValue;
    QStringList MainPageBvLIst;
    QStringList MainFacelist;
    QStringList MainTitlelist;
    QStringList SearchedFaceList;
    QStringList SearchedTextList;
    void getMainPageTitle();
    void getMainPageFaces();
    void getMainPageJson();
    void LoadMainPageInfor();
    QToolButton * left_list[3];
    void ChooseButton(int index);
    void getMainPageBV();
    void getSearchedBV(QString key, int page);
    void hideMainPage();
    void showMainPage();
    void showHistoryPage();
    void hideAbousPage();
    void doubleclicked(QListWidgetItem* item);
    void GotoSearchPage();
    void GetSearchedText(QString key,int page);
    void GetSearchedFace(QString key,int page);
    void ReloadSearched(int page);
    void CleanFaces();
private slots:
    void on_pushButton_2_clicked(bool checked);

    void on_toolButton_2_clicked(bool checked);

    void on_toolButton_3_clicked(bool checked);

    void on_toolButton_4_clicked(bool checked);

private:
    Ui::MainWindow *ui;
    QGraphicsBlurEffect *blurEffect;

private slots:
    void ChooseVideoButton();
    void ChooseVideoButton2();
    void ChooseVideoButton3();
    void ChooseVideoButton4();
    void ChooseVideoButton5();
    void ChooseVideoButton6();
    void ChooseVideoButton7();
    void ChooseVideoButton8();
    void ChooseVideoButton9();
    void ChooseVideoButton10();
    void ChooseVideoButton11();
    void ChooseVideoButton12();
    void ChooseVideoButton13();
    void ChooseVideoButton14();
    void ChooseVideoButton15();
    void ChooseVideoButton16();
    void ChooseVideoButton17();
    void ChooseVideoButton18();
    void ChooseVideoButton19();
    void ChooseVideoButton20();
    void on_replace_clicked(bool checked);
    void on_playSelected_clicked(bool checked);
    void on_pushButton_3_clicked(bool checked);
    void on_cancelSearch_clicked(bool checked);
    void on_DeleteSelected_clicked(bool checked);
    void on_DelectAll_clicked(bool checked);
    void on_gotoNextPage_clicked(bool checked);
    void on_gotoLastPage_clicked(bool checked);
};
#endif // MAINWINDOW_H
